//
//  UIColor+Extension.m
//  GameSDK
//
//  Created by Johnny on 2017/7/31.
//  Copyright © 2017年 Johnny. All rights reserved.
//

#import "UIColor+Extension.h"

@implementation UIColor (Extension)
- (UIImage *)createImage {
    CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f);
    UIGraphicsBeginImageContext(rect.size);
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetFillColorWithColor(context, [self CGColor]);
    CGContextFillRect(context, rect);
    UIImage * theImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return theImage;
}
@end
